package installer;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class SQLGetter {
	public static String get(String dir) throws IOException {
		BufferedReader reader = null;
		dir = SQLGetter.class.getClassLoader().getResource(dir).getPath();
		//System.out.println(dir);
		reader = new BufferedReader(new FileReader(dir));
		String line = null;
		String content = "";
		do {
			line = reader.readLine();
			if (line != null) {
				content = content + " " + line;
				System.out.println(line);
			} else
				System.out.println("EOF");
		} while (line != null);
		return content;
	}
	public static void main(String arg[]){
		try {
			String str=get("installer/InstallJFSDirectory.sql");
			System.out.println(str);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
